1. Field of the Invention
The present invention relates to an apparatus for decoding compressed codes obtained by band compression encoding, employed in facsimile or electronic image file.
2. Description of the Prior Art
In conventional image transmitting system such as facsimile, or image file employing for example optical or magnetic disks, image data are compressed for reducing the quantity of data, in order to achieve efficient high-speed transmission or storage.
Such data compression is achieved by so-called code conversion. In modified Hoffman (MH) encoding process, which is a typical data compression process, each block of consecutive white or black pixels in the image is replaced by another compression code. A frequently appearing pixel block is represented by a compression code of a shorter code length while a less frequently appearing pixel block is represented by a compression code of a longer code length. In this manner the entire image is represented by a train of other codes of a smaller number of bits, based on the deviation in the frequency of combinations of pixels.
In the above-mentioned MH encoding process, an end-of-line signal (EOL code), indicating the end of each line, is added to the compression codes representing the image information. Said EOL code does not represent the image information but is utilized in line control in the printing operation for the decoded image information or for detecting the leading end of the compression codes to be decoded.
In recent years there have been developed high-speed printers capable of image formation of high image quality such as laser beam printers utilizing electrophotographic process, and it is desired to achieve real-time regeneration of a compressed image by means of such printer. For achieving such real-time decoding and image reproduction, it is essential to establish exact synchronization between the recording operation of each line in the printer and the decoding operation for the compression codes.
In the MH encoding process, the correspondence between each block of pixels and each compression code is determined by an empirical rule, and the code length of the compression codes is not constant. Consequently, when plural compression codes are entered in consecutively manner, it is required to exactly separate the compression codes of different code lengths for achieving accurate decoding.
In the conventional facsimile apparatus, a high-speed decoding is not required since the signal transfer rate in the transmission line is not high and a very high image quality is not expected. For this reason, in such facsimile apparatus, the decoding for consecutively entered compression codes is achieved by a software process in an inexpensive microcomputer.
On the other hand, as mentioned above, it is desired to effect real-time reproduction of the compressed image, utilizing a recently developed high-speed printer capable of high-quality image formation such as an electrophotographic laser beam printer. However the processing speed in such printer is in excess of 10 megabits per second, which cannot be handled by a software process in a microcomputer. Consequently the conventional software decoding cannot be applied to such case, without a suitable measure such as the use of a semiconductor page memory.
Also as mentioned before, an end-of-line (EOL) code is added, in the MH encoding process, to the compression codes in order to indicate the end of each line, and the receiving apparatus achieves line synchronization by means of said EOL code. Thus, in case an error occurs in the decoding operation by some reason, the decoding circuit re-starts the decoding operation by detecting an immediately succeeding EOL code. The EOL code plays an important role in the decoding operation, and an erroneous detection of the EOL code induces an error in the succeeding decoding operation, thus hindering exact image reproduction.
Also the length of code or codes constituting a line is not constant since the compression codes have different code lengths as mentioned before. The detection of the EOL code is rendered difficult by this fact, since the interval between two EOL codes is not constant.
Also as mentioned before, the EOL code does not represent any image information. Thus, decoding of the EOL code is unnecessary and is a mere loss of time with a complication in the decoding logic.
Since compression codes represent different numbers of pixels, thus requiring different times for image reproduction. For this reason it is difficult to determine the timing of supply of a succeeding code to the decoding circuit. However, for example in a printer incapable of intermittent operation, the decoded data have to be continuously supplied from the decoding circuit to the printer, and the decoding operation of the compression codes has to be effected in corresponding manner.
The decoding operation may not be effected in proper manner either by an erroneous operation of the decoding circuit itself or by signal attenuation or external noises in the transmission of the compression codes. In such case the number of pixels or run length may become different from the compression code, so that the image recorded by the decoded image signals may be distorted. Also an error in the decoding of a compression code affects the decoding operation for the ensuing codes, so that such error has to be minimized.